package com.opener.web.auth.dao;

import com.opener.web.auth.model.UserAuthToken;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 *
 * @author baboy
 * @date 08/12/2016
 */
@Repository
public interface UserAuthDao {
    int addAuthToken(UserAuthToken token);
    boolean updateAuthToken(UserAuthToken token);
    List<UserAuthToken> getAuthTokens(@Param("uid") int uid, @Param("type") String type, @Param("domain") String domain, @Param("concurLoginNum") int concurLoginNum);
    UserAuthToken getAuthTokenByUkey(String ukey);
    UserAuthToken getLastAuthToken(@Param("uid") Integer uid,@Param("platform") String platform);
}
